import React from 'react';
import PropTypes from 'prop-types';
import { YunxiaoIcon } from '@alife/devops-ui';

export default function Error(props) {
  const { text } = props;
  return (
    <div>
      <YunxiaoIcon type="delete-fill" style={{ color: '#FF3333', marginRight: '4px' }} />
      <span>{text}</span>
    </div>
  );
}

Error.propTypes = {
  text: PropTypes.node,
};

Error.defaultProps = {
  text: '',
};
